
include common.xcconfig

CXXFLAGS = -O3 -msse2 -fPIC -Wno-invalid-offsetof -I.

LDFLAGS	 = -Lnanojit/  -lnanojit

EXENAME = joosVM
SRC  = ${wildcard *.cpp} 
OBJ=${patsubst %.cpp, %.o, ${SRC}}

all: libs ${EXENAME}

%o: %.cpp
	g++ ${CPPFLAGS} ${CXXFLAGS} -c $<

libs:
	cd nanojit; make

clean:
	cd nanojit;	 make clean
	-rm ${OBJ} ${EXENAME}

${EXENAME}: ${OBJ}
	g++ $^ ${LDFLAGS} -o $@

.PHONY: lib clean
